<template>
	<view class="containner">
		<view class="count">您共邀请 {{teamCount}}个人</view>
		<view class="teammate">
			<view v-if="teamCount == 0" class=""><u-empty mode="data"></u-empty></view>
			<view v-if="teamCount != 0" class="">
				<view class="teammateItem" v-for="(item,index) in myteamlist" :key="index">
					<view class="teammateItems">
						<view>
							<u-avatar size="80" :src="item.avatar_format"></u-avatar>
						</view>
						<view class="teammateInfo">
							<view class="teammateName">
								<text>{{item.nickname}}</text>
							</view>
							<view class="timer">昵称</view>
						</view>
					</view>
					<view class="">
						<view class="">{{item.updtime}}</view>
						<view class="timer" style="text-align: right;font-size: 22upx;">注册时间</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import { getmyTeam } from '@/api/user.js'
	export default {
		data() {
			return {
				barStyle:{
					backgroundColor:'#01a90c'
				},
				myteamlist:[],
				teamCount:0
			};
		},
		mounted() {
			this.init()
		},
		methods: {
			change(index) {
				this.current = index;
			},
			init(){
				let that = this;
				getmyTeam().then(res=>{
					// console.log(88,res.list);
					that.myteamlist = res.list;
					that.teamCount = res.total;
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
.containner{
	min-height: 100vh;
	background-color: #f0f2f5;
	overflow: hidden;
}
.count{
	margin-top: 20upx;
	background-color: #fff;
	padding: 10upx 30upx;
}
.teammate{
	
	// padding: 0 30upx;
	overflow: hidden;
	.teammateItem{
		display: flex;
		justify-content: space-between;
		border-bottom: #EDEDED 1upx solid;
		margin-top: 20upx;
		background-color: #fff;
		padding: 10upx 30upx;
	}
	.teammateItems{
		display: flex;
	}
	.teammateInfo{
		margin-left: 13upx;
		.teammateName{
			font-size: 28upx;
		}
		.identity{
			margin-left: 12upx;
			font-size: 16upx;
			color: #fff;
			background: linear-gradient(0deg, #A7B1BD, #A0A0A0, #A2A2A2);
			border-radius: 8px;
			padding: 5upx;
		}
		
	}
}
.timer{
			font-size: 22upx;
			margin-top: 12upx;
		}
</style>